<template>
	<view class="content" :style="{background:$store.state.bgPrimaryColor}">
		<view class="Box">
			<view class="BoxView">
				<view class="BoxOne">
					<u--image :showLoading="true" :src="info.avatar" width="160rpx" height="160rpx" radius="0"
						shape="circle"></u--image>
					<view class="BoxContent">
						<view class="BoxTop marginBottom">
							<text class="title">{{info.name || ''}}</text>
							<text style="color:#888888;margin-left:15rpx;">{{info.country.name}}教师</text>
						</view>
						<view class="BoxTop marginBottom">
							<u-rate :count="1" size="20" gutter="20" :activeColor="$store.state.primaryColor"
								readonly></u-rate>
							<text class="fen"
								:style="{color:$store.state.primaryColor}">{{(info.avg_comment_score).toFixed(1) || ''}}</text>
						</view>
						<view class="BoxTop">
							<text class="Newtitle">{{info.speciality || ''}}</text>
						</view>
					</view>
				</view>
				<u--image :showLoading="true" src="../../static/Home/heiaixin.png" width="32rpx" height="32rpx"
					radius="0" v-if="info.is_collect == 0" @click="collectTeacher(info.id,1)"></u--image>
				<!-- <u--image :showLoading="true" src="../../static/static/dianzan_huangse.png" width="140rpx" height="140rpx"
					radius="0" v-else @click="collectTeacher(info.id,0)"></u--image> -->
				<image src="../../static/static/dianzan_huangse.png" style="width:32rpx;height:30rpx;" v-else
					@click="collectTeacher(info.id,0)"></image>
			</view>
		</view>
		<view class="message_Flex">
			<u--image :showLoading="true" src="../../static/Home/gb.png" width="40rpx" height="42rpx"></u--image>
			<text>温馨提示：固定课程每周只能请一次假，请假需提前12小时～</text>
			<view class="view">
				<view class="yuan"></view>
				<u--image :showLoading="true" src="../../static/more.png" width="28rpx" height="28rpx"></u--image>
			</view>
		</view>
		<view class="headers_title" style="margin-top:30rpx;">
			<view class="view"></view>
			<text>关于老师</text>
		</view>
		<view class="scrollBody">
			<text>{{info.description || ''}}</text>
		</view>
		<view class="headers_title">
			<view class="view"></view>
			<text>{{title == 'switch' ? '固定课程' : '工作时间'}}</text>
		</view>
		<view class="working_hours">
			<view class="view">
				<u--image :showLoading="true" src="../../static/Home/rqi.png" width="34rpx" height="34rpx"
					radius="0"></u--image>
				<text>{{title == 'switch' ? '固定课周期默认为四周' : '周一至周六'}}</text>
			</view>
			<view class="view">
				<u--image :showLoading="true" src="../../static/Home/shijian.png" width="34rpx" height="34rpx"
					radius="0"></u--image>
				<text>25分钟/节</text>
			</view>
		</view>
		<view class="headers_Flex">
			<view class="headers_title" style="margin-top:0rpx;">
				<view class="view"></view>
				<text>预约时间</text>
			</view>
			<view class="headers_Flex" style="margin-top:0rpx;">
				<text>每周课程数：</text>
				<u-number-box :min="2" v-model="req.nums" @change="valChange">
					<view slot="minus" class="minus">
						<u-icon name="minus" size="12" color="#000000" :bold="true"></u-icon>
					</view>
					<view slot="plus" class="plus">
						<u-icon name="plus" color="#fff" size="12"></u-icon>
					</view>
				</u-number-box>
			</view>
			<!-- <u-number-box v-model="req.nums" @change="valChange" :min="2">
				<view slot="minus" class="minus">
					<u-icon name="minus" size="12" color="#333"></u-icon>
				</view>
				<text slot="input" style="width: 50px;text-align: center;" class="input">{{req.nums}}</text>
				<view slot="plus" class="plus">
					<u-icon name="plus" color="#fff" size="12"></u-icon>
				</view>
			</u-number-box> -->
		</view>
		<view class="text_flex" v-if="title == 'switch'">
			<view class="view">
				<u--image :showLoading="true" src="../../static/Home/rqi.png" width="34rpx" height="34rpx"
					radius="0"></u--image>
				<text>温馨提示：请先选择每周固定课程数，在进行约课，默认下周开课。</text>
			</view>
		</view>
		<view class="text_flex">
			<text>▲为已被预约时段。</text>
		</view>
		<view class="headers">
			<kc :value="req.nums" :option="option"></kc>
		</view>
		<view class="buttonFlex">
			<button class="Single_appointment" :style="{'background':$store.state.buttonColor}"
				@click="LinkUrl(1)">1v1固定预约</button>
			<button class="Single_appointment" :style="{'background':$store.state.buttonColor}"
				@click="LinkUrl(2)">1v2固定预约</button>
		</view>
		<u-popup :show="iSshow" @close="iSshow = false" @open="iSshow = true" mode="bottom" :closeable="false"
			:round="50">
			<view class="popupBody">
				<view class="headersBody">
					<u-icon name="close" color="#ebf7ff" size="20"></u-icon>
					<text>分享二维码</text>
					<u-icon name="close" color="#888888" size="20" @click="iSshow = false"></u-icon>
				</view>
				<view class="qrcode">
					<image id="qrcode" :src="qrUrl" style="width: 200px; height: 200px"></image>
				</view>
				<text class="tips_text">务必保存此二维码并在5分钟之后邀请伙伴完成预约，否则将自动取消预约课程！</text>
				<view class="buttonFlex">
					<button class="leftButton" @click="copy">复制链接</button>
					<button class="rightButton" @click="save_img"
						:style="{ background: $store.state.buttonColor }">长按保存</button>
				</view>
			</view>
		</u-popup>
		<u-popup :show="show" @close="show = false" @open="show = true" mode="center" round="20">
			<view class="NewpopupBody">
				<text class="title">提示</text>
				<text class="content_text">请选择预约时间</text>
				<view class="but_flex">
					<button class="leftButton" @click="show = false">取消</button>
					<button class="rightButton" :style="{ background: $store.state.buttonColor }"
						@click="show = false">确认</button>
				</view>
			</view>
		</u-popup>
		<u-popup :show="kcIsShow" @close="kcIsShow = false" @open="kcIsShow = true" mode="center" round="20">
			<view class="NewpopupBody">
				<text class="title">提示</text>
				<text class="content_text">是否确定预约该课程？</text>
				<view class="but_flex">
					<button class="leftButton" @click="kcIsShow = false">取消</button>
					<button class="rightButton" :style="{ background: $store.state.buttonColor }"
						@click="confirm">确认</button>
				</view>
			</view>
		</u-popup>
		<canvas id="qrcode" canvas-id="qrcode" style="width: 200px; height: 200px;position: absolute;
		left: -9999px;
		 z-index: -999;"></canvas>
		<u-popup :show="addshow" @close="addshow = false" @open="addshow = true" mode="center" round="20">
			<view class="addNewpopupBody">
				<text class="title">请先完成答题再约课</text>
				<view class="but_flex">
					<button class="leftButton" :style="{'background':$store.state.buttonColor}"
						@click="qxiao">取消</button>
					<button class="rightButton" :style="{'background':$store.state.buttonColor}"
						@click="qding">确认</button>
				</view>
			</view>
		</u-popup>
		<u-popup :show="IsVip" @close="IsVip = false" @open="IsVip = true" mode="center" round="20">
			<view class="addNewpopupBody">
				<text class="title">请先购卡再约课</text>
				<view class="but_flex">
					<button class="rightButton" :style="{'background':$store.state.buttonColor}"
						@click="qxiaoNew">确认</button>
				</view>
			</view>
		</u-popup>
		<u-popup :show="isNums" @close="isNums = false" @open="isNums = true" mode="center" round="20">
			<view class="NewpopupBody">
				<text class="title">提示</text>
				<text class="content_text">请选择{{req.nums}}个时间段</text>
				<view class="but_flex">
					<button class="leftButton" @click="isNums = false">取消</button>
					<button class="rightButton" :style="{ background: $store.state.buttonColor }"
						@click="isNums = false">确认</button>
				</view>
			</view>
		</u-popup>
	</view>
</template>
<script>
	import {
		teacherLists,
		collectTeacher,
		teacher_category,
		teacherCountry,
		teacher_info,
		fitness_course_add,
		getJsSdk
	} from '../../api/Teacher.js';
	import {
		userinfo
	} from '../../api/Mine.js';
	import kc from '../../components/kc/kc.vue';
	import UQRCode from '../../uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js';
	import jWeixin from '../../js_sdk/jweixin-module';
	export default {
		components: {
			kc
		},
		data() {
			return {
				iSshow: false,
				show: false,
				addshow: false,
				kcIsShow: false,
				isNums: false,
				IsVip: false,
				qrUrl: '',
				scrollTop: 0,
				Payinfo: {},
				courses: [{
					name: '全部'
				}, {
					name: '英语'
				}, {
					name: '法语'
				}, {
					name: '俄语'
				}],
				info: {},
				option: '',
				req: {
					teacher_id: 0,
					shop_id: 0,
					date: '',
					nums: 2, //周数
					content: [], //week：1-7对应星期一到星期日
					type: '', //1：1v1固定课程，2:1v2固定课程
					text_box_id: 0,
					user_vip_id: 0
				},
				title: '',
				type: '',
				vip_type: '',
				kcType: '',
				addinfo: [],
				auuarr: '',
			}
		},
		onUnload() {
			console.log(3323222)
			uni.$off('jiaocai');
			uni.$off('changeInvoiceClose');
		},
		onLoad(option) {
			this.userinfo();
			if (option.hasOwnProperty('title')) this.title = option.title;
			if (option.hasOwnProperty('type')) this.type = option.type;
			if (option.hasOwnProperty('vip_type')) this.vip_type = option.vip_type;
			this.req = {
				...this.req,
				...{
					teacher_id: option.id,
					shop_id: uni.getStorageSync('shop_id') || 1
				}
			};
			this.teacher_info(option.id, this.req.date);
			this.option = option.id
		},
		mounted() {
			this.share();
			uni.$on('kcCheck', (e) => {
				let arrs = new Array();
				for (var i = 0; i < e.length; i++) {
					for (var j = 0; j < e[i].children.length; j++) {
						if (e[i].children[j].is_choose == 1) {
							arrs.push({
								"week": j + 1,
								"start_time": e[i].time
							});
						}
					}
				}
				this.req.content = [...arrs];
			});
		},
		// onReady() {
		// 	this.generate()
		// },
		onShow() {
			uni.$on('changeInvoiceClose', (data) => {
				this.req.user_vip_id = data.id
				this.req.start_time = data.start_time
				uni.showLoading({
					title: "加载中"
				});
				if (this.req.text_box_id == 0) {
					setTimeout(() => {
						uni.hideLoading();
						uni.navigateTo({
							url: '/pages/Mine/Tutorial_courses?dianji=' + 1 + '&teacher_id=' + this
								.req.teacher_id + '&type=' + this.type
						});
					}, 500);
				}
			})
			uni.$on('jiaocai', (data) => {
				this.req.text_box_id = data.id
				if (this.type == '1v1') {
					this.LinkUrl(this.kcType);
				} else {
					if (this.req.text_box_id != 0) {
						uni.showLoading({
							title: "加载中"
						});
						setTimeout(() => {
							uni.hideLoading();
							uni.navigateTo({
								url: `/pages/Order/pay?payinfo=${JSON.stringify(this.req)}`
							});
						}, 500)
					}
				}
			})
		},
		methods: {
			/**
			@method 分享
			**/
			async share() {
				try {
					var th_is = this;
					const res = await getJsSdk({
						url: '/pages/Mine/Fixedappointment'
					});
					jWeixin.config({
						debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
						appId: res.data["appId"], // 必填，公众号的唯一标识
						timestamp: res.data["timestamp"], // 必填，生成签名的时间戳
						nonceStr: res.data["nonceStr"], // 必填，生成签名的随机串
						signature: res.data["signature"], // 必填，签名
						jsApiList: ["updateAppMessageShareData", "updateTimelineShareData"] // 必填，需要使用的JS接口列表
					});
					jWeixin.ready(function() {
						if (th_is.kcType == 1 || th_is.kcType == '1') {
							// 分享给朋友
							jWeixin.updateAppMessageShareData({
								title: "约课", // 分享标题
								desc: "邀请您参加预约课程", // 分享描述
								link: window.location.href, // 分享链接
								imgUrl: th_is.info.avatar, // 分享图标
								type: 'link', // 分享类型,music、video或link，不填默认为link
								success: function() {
									// 分享成功回调
								}
							});
							// 分享到朋友圈
							jWeixin.updateTimelineShareData({
								title: "约课", // 分享标题
								desc: "邀请您参加预约课程", // 分享描述
								link: window.location.href, // 分享链接
								imgUrl: '', // 分享图标
								success: function() {
									// 分享成功回调
								}
							});
						} else {
							// 分享给朋友
							jWeixin.updateAppMessageShareData({
								title: '1v2固定预约', // 分享标题
								desc: "1v2固定预约", // 分享描述
								link: `https://yuekewap.worldtalker.cn/#/pages/reservation/index?order_id=${th_is.Payinfo.order_id}`, // 分享链接
								imgUrl: th_is.info.avatar, // 分享图标
								type: 'link', // 分享类型,music、video或link，不填默认为link
								success: function() {
									// 分享成功回调
								}
							});
							// 分享到朋友圈
							jWeixin.updateTimelineShareData({
								title: '1v2固定预约', // 分享标题
								desc: "1v2固定预约", // 分享描述
								link: `https://yuekewap.worldtalker.cn/#/pages/reservation/index?order_id=${th_is.Payinfo.order_id}`, // 分享链接
								imgUrl: th_is.info.avatar, // 分享图标
								success: function() {
									// 分享成功回调
								}
							});
						}
					});
				} catch (err) {
					//TODO handle the exception
					console.log(err);
				}
			},
			qding() {
				this.addshow = false
				uni.reLaunch({
					url: '/pages/Questionnaire/Test_questionnaire?title=' + this.auuarr
				})
			},
			qxiaoNew() {
				this.IsVip = false
				uni.switchTab({
					url: '/pages/Tabbar/Home/Home'
				})
			},
			qxiao() {
				this.addshow = false
				uni.switchTab({
					url: '/pages/Tabbar/Home/Home'
				})
			},
			/**
				@method 老师详情
				**/
			async userinfo() {
				try {
					const res = await userinfo({
						shop_id: uni.getStorageSync('shop_id') || 1
					});
					this.addinfo = res.data.userinfo;
					if (this.addinfo.level_id > 1 && this.addinfo.is_answer == 0) {
						this.addshow = true
					}
					if (this.addinfo.student_type_id == 1) {
						this.auuarr = '孩童'
					} else if (this.addinfo.student_type_id == 2) {
						this.auuarr = '孩童'
					} else if (this.addinfo.student_type_id == 3) {
						this.auuarr = '成人'
					}
				} catch (err) {
					//TODO handle the exception
					console.log(err);
				}
			},
			generate() {
				var qr = new UQRCode();
				qr.data = `https://yuekewap.worldtalker.cn/#/pages/reservation/index?order_id=${this.Payinfo.order_id}`;
				qr.size = 200;
				qr.make();
				var canvasContext = uni.createCanvasContext('qrcode', this);
				qr.canvasContext = canvasContext;
				qr.drawCanvas();
				this.saveQRCodeImage();
			},
			saveQRCodeImage() {
				const canvasId = 'qrcode'; // Canvas ID，与UQRCode绑定的Canvas ID保持一致
				uni.canvasToTempFilePath({
					canvasId: canvasId,
					success: (res) => {
						console.log('二维码图片临时文件路径:', res.tempFilePath);
						let base64Data = res.tempFilePath.replace(/[\r\n]/g, '');
						this.qrUrl = base64Data;
						console.log(base64Data);
					},
					fail: (error) => {
						console.error('获取二维码图片失败:', error);
						uni.showToast({
							title: '获取二维码失败',
							icon: 'none'
						});
					}
				});
			},
			copy() {
				uni.setClipboardData({
					data: `https://yuekewap.worldtalker.cn/#/pages/reservation/index?order_id=${this.Payinfo.order_id}`,
					success: function() {
						uni.showToast({
							title: '复制成功！',
							icon: 'none',
							duration: 2000
						});
					}
				});
			},
			/**
			@method 保存图片
			**/
			save_img(href) {
				uni.showToast({
					title: '请长按保存二维码！',
					icon: 'none',
					duration: 2000
				});
				// // 创建一个隐藏的链接元素
				// const link = document.createElement('a');
				// link.href = this.qrUrl;
				// // 指定下载的文件名
				// link.download = '分享二维码';
				// // 将链接元素添加到 DOM
				// document.body.appendChild(link);
				// // 模拟点击链接以触发下载
				// link.click();
				// // 下载完成后移除链接元素
				// document.body.removeChild(link);
				// uni.canvasToTempFilePath({
				// 	x: 100,
				// 	y: 200,
				// 	width: 50,
				// 	height: 50,
				// 	destWidth: 100,
				// 	destHeight: 100,
				// 	canvasId: 'qrcode',
				// 	success: function (res) {
				// 		console.log(res)
				// 		const aEle = document.createElement('a')
				// 		aEle.download = 'uQRCode' // 设置下载的文件名，默认是'下载'
				// 		aEle.href = res.tempFilePath
				// 		uni.saveImageToPhotosAlbum({
				// 			filePath: res.tempFilePath,
				// 			success: () => {
				// 				uni.showToast({
				// 					title: '保存成功',
				// 					icon: 'success'
				// 				})
				// 			}
				// 		})
				// 		document.body(aEle)
				// 		aEle.click()
				// 		aEle.remove() // 下载之后把创建的元素删除
				// 	}
				// })
			},
			/**
			@method 点赞
			**/
			async collectTeacher(item, type) {
				try {
					const res = await collectTeacher({
						teacher_id: item || '',
						type: type, //0取消收藏 1收藏
					});
					this.teacher_info(this.req.teacher_id, this.req.date)
					uni.showToast({
						title: type == 0 ? '取消收藏成功' : '已收藏',
						icon: 'none',
						duration: 2000
					});
				} catch (err) {
					//TODO handle the exception
					console.log(err);
				}
			},
			/**
			@method 固定预约
			**/
			async fitness_course_add(req) {
				try {
					const res = await fitness_course_add(req);
					uni.showToast({
						title: res.code == 1 ? '预约成功' : '预约失败',
						icon: 'none',
						duration: 2000
					});
					if (res.code == 1) {
						this.Payinfo = {
							...res.data
						};
						this.generate();
						if (this.kcType == '2' || this.kcType == 2) {
							this.iSshow = true;
							this.share();
						} else {
							setTimeout(() => {
								uni.navigateTo({
									url: `/pages/Mine/MyFixedcourses?current=${0}`
								});
							}, 1000);
						}
					} else {
						uni.showToast({
							title: res.msg,
							icon: 'none',
							duration: 2000
						});
					}
					this.teacher_info(this.req.teacher_id, this.req.date)
				} catch (err) {
					//TODO handle the exception
					console.log(err);
				}
			},
			transformText(index) {
				let TextTime = ['一', '二', '三', '四', '五', '六', '日', ];
				return TextTime[index];
			},
			/**
			@method 老师所属国家
			**/
			async teacher_info(teacher_id, date) {
				try {
					const res = await teacher_info({
						teacher_id: teacher_id,
						date: date
					});
					this.info = {
						...res.data
					};
				} catch (err) {
					//TODO handle the exception
					console.log(err);
				}
			},
			valChange(e) {
				console.log(e);
			},
			LinkUrl(e) {
				if (this.req.content.length == 0 || this.req.content.length < this.req.nums) {
					this.isNums = true;
					return false;
				}
				switch (e) {
					case 1:
						if (this.addinfo['1v1_num'] == 0 || this.addinfo['1v1_num'] == '0') {
							this.IsVip = true;
							return false;
						}
						break;
					case 2:
						if (this.addinfo['1v2_num'] == 0 || this.addinfo['1v2_num'] == '0') {
							this.IsVip = true;
							return false;
						}
						break;
				}
				this.kcType = e;
				if (this.req.user_vip_id) {
					if (this.type == '1v1') {
						this.kcIsShow = true;
					} else {
						uni.navigateTo({
							url: '/pages/Mine/Tutorial_courses?dianji=' + 1 + '&type=' + this.type
						});
					}
				} else {
					uni.navigateTo({
						url: '/pages/Mine/MyVip?start_time=' + this.req.content[0].start_time + '&type=' + this
							.type + '&vip_type=' + `${e == 1 ? 2 : 3}`
					});
				}
			},
			confirm() {
				let Strs = new Array();
				Strs = this.req.content;
				// console.log(JSON.stringify(Strs), 'gggg')
				this.req = {
					...this.req,
					...{
						type: this.kcType,
						content: JSON.stringify(Strs)
					}
				};
				this.fitness_course_add(this.req);
				this.kcIsShow = false;
			}
		}
	}
</script>
<style scoped lang="scss">
	button::after {
		border: none;
	}

	.tips_text {
		width: 90%;
		display: block;
		font-size: 28rpx;
		color: red;
		text-align: left;
		margin: 0px auto;
		margin-top: 40rpx;
	}

	.addNewpopupBody {
		width: 550rpx;
		height: 300rpx;
		padding-top: 50rpx;

		.title {
			font-family: PingFangSC, PingFang SC;
			font-weight: 600;
			font-size: 36rpx;
			color: #333333;
			display: block;
			text-align: center;
		}

		.but_flex {
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-top: 80rpx;

			.leftButton {
				width: 40%;
				height: 74rpx;
				font-family: PingFangSC, PingFang SC;
				font-weight: 600;
				font-size: 32rpx;
				color: #fff;
				display: flex;
				justify-content: center;
				align-items: center;
				border-radius: 50rpx;
				// background-color: #efefef;
			}

			.rightButton {
				width: 40%;
				height: 74rpx;
				font-family: PingFangSC, PingFang SC;
				font-weight: 600;
				font-size: 32rpx;
				color: #fff;
				display: flex;
				justify-content: center;
				align-items: center;
				border-radius: 50rpx;
				background-color: #267fff;
			}
		}
	}

	.message_Flex {
		width: 92%;
		height: auto;
		margin: 0px auto;
		background-image: url('../../static/Home/gb.png');
		border-radius: 20rpx;
		height: 50px;
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-top: 10rpx;
		padding: 0 20rpx;

		text {
			width: 80%;
			font-size: 24rpx;
			color: #4D5962;
			margin: 0px auto;
			display: flex;
			justify-content: center;
		}

		.view {
			display: flex;
			align-items: center;

			.yuan {
				width: 14rpx;
				height: 14rpx;
				background: #2581FF;
				border-radius: 50%;
				margin-right: 10rpx;
			}
		}
	}

	.NewpopupBody {
		width: 550rpx;
		height: auto;
		padding-top: 50rpx;
		padding-bottom: 50rpx;

		.title {
			font-family: PingFangSC, PingFang SC;
			font-weight: 600;
			font-size: 36rpx;
			color: #333333;
			display: block;
			text-align: center;
		}

		.content_text {
			font-family: PingFangSC, PingFang SC;
			font-weight: 500;
			font-size: 28rpx;
			color: #999999;
			display: block;
			text-align: center;
			padding-top: 30rpx;
			padding-bottom: 30rpx;
			letter-spacing: 2rpx;
		}

		.but_flex {
			display: flex;
			justify-content: space-between;
			align-items: center;

			.leftButton {
				width: 40%;
				height: 70rpx;
				font-family: PingFangSC, PingFang SC;
				font-weight: 600;
				font-size: 32rpx;
				color: #333333;
				display: flex;
				justify-content: center;
				align-items: center;
				border-radius: 50rpx;
				background-color: #efefef;
			}

			.rightButton {
				width: 40%;
				height: 70rpx;
				font-family: PingFangSC, PingFang SC;
				font-weight: 600;
				font-size: 32rpx;
				color: #fff;
				display: flex;
				justify-content: center;
				align-items: center;
				border-radius: 50rpx;
				// background-color:#267fff;
			}
		}
	}

	.qrcode {
		display: flex;
		justify-content: center;
		align-items: center;
		height: auto;
		// canvas {
		// 	border: 1px solid #000 !important;
		// }
	}

	.content {
		width: auto;
		height: 8vh;
		padding: 30rpx;
		position: relative;

		/deep/ .u-safe-bottom {
			display: none;
		}

		#qrcode {
			margin: 0rpx auto;
			margin-top: 50rpx;
		}

		.popupBody {
			.headersBody {
				display: flex;
				justify-content: space-between;
				padding: 30rpx;
				border-top-left-radius: 30rpx;
				border-top-right-radius: 30rpx;

				text {
					font-family: PingFangSC, PingFang SC;
					font-weight: 600;
					font-size: 32rpx;
					color: #202020;
				}
			}

			.Newqrcode {
				width: auto;
				height: auto;
				margin: 0px auto;
				// background-color: #000000;
				margin-top: 40rpx;
			}

			.buttonFlex {
				margin-top: 100rpx;
				margin-bottom: 10rpx;
				display: flex;
				align-items: center;
				justify-content: space-around;

				.leftButton {
					width: 40%;
					height: 75rpx;
					margin: 0px;
					background-color: #efefef;
					color: #333;
					display: flex;
					justify-content: center;
					align-items: center;
					border-radius: 50rpx;
					font-size: 28rpx;
					letter-spacing: 2rpx;
				}

				.rightButton {
					width: 40%;
					height: 75rpx;
					margin: 0px;
					// background-color: #277ffe;
					color: #fff;
					display: flex;
					justify-content: center;
					align-items: center;
					border-radius: 50rpx;
					font-size: 28rpx;
					letter-spacing: 2rpx;
				}
			}
		}

		.text_flex {
			margin-top: 10rpx;

			.view {
				display: flex;
				align-items: center;
			}

			text {
				margin-left: 5rpx;
			}
		}

		.headers_Flex {
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-top: 60rpx;

			/deep/ .minus {
				width: 36rpx !important;
				height: 36rpx !important;
				color: #333;
				padding: 5rpx;
				border: 1px solid #d4d4d4;
				border-radius: 50%;
				display: flex;
				justify-content: center;
				align-items: center;

				/deep/ .uicon-minus {
					color: #fff !important;
				}
			}

			/deep/ .plus {
				width: 36rpx !important;
				height: 36rpx !important;
				padding: 5rpx;
				border-radius: 50%;
				display: flex;
				justify-content: center;
				align-items: center;

				/deep/ .u-icon--right .uicon-plus {
					margin-top: 10rpx !important;
				}
			}

			/deep/ .u-number-box__input {
				font-size: 28rpx !important;
			}
		}

		.buttonFlex {
			display: flex;
			justify-content: space-between;
			align-items: center;
		}

		.Single_appointment {
			width: 308rpx;
			height: 70rpx;
			margin: 0px auto;
			border-radius: 50rpx;
			color: #fff;
			display: flex;
			justify-content: center;
			align-items: center;
			font-size: 28rpx;
			letter-spacing: 2rpx;
			margin-top: 60rpx;
			margin-bottom: 60rpx;
		}

		.statusType {
			display: flex;
			align-items: center;
			margin-top: 30rpx;

			.leftview {
				display: flex;
				align-items: center;
				margin-right: 30rpx;

				view {
					width: 62rpx;
					height: 14rpx;
					background-color: #fff;
					border-radius: 50rpx;
				}

				text {
					font-family: PingFangSC, PingFang SC;
					font-weight: 400;
					font-size: 24rpx;
					color: #333333;
					margin-left: 10rpx;
				}
			}

			.rightview {
				display: flex;
				align-items: center;

				view {
					width: 62rpx;
					height: 14rpx;
					background-color: #eaeaea;
					border-radius: 50rpx;
				}

				text {
					font-family: PingFangSC, PingFang SC;
					font-weight: 400;
					font-size: 24rpx;
					color: #333333;
					margin-left: 10rpx;
				}
			}
		}

		.button_flex {
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-top: 40rpx;

			button {
				width: 140rpx;
				height: 50rpx;
				font-family: PingFangSC, PingFang SC;
				font-weight: 500;
				font-size: 26rpx;
				border-radius: 46rpx;
				margin: 0px;
				display: flex;
				justify-content: center;
				align-items: center;
				color: #fff;
			}
		}

		.Box {
			padding-bottom: 30rpx;

			.BoxView {
				width: auto;
				margin: 0px auto;
				// background-color: #fff;
				border-radius: 20rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;
			}

			.BoxOne {
				display: flex;
				justify-content: space-between;
				align-items: center;

				.marginBottom {
					margin-bottom: 10rpx;

					.fen {
						font-family: PingFangSC, PingFang SC;
						font-weight: 600;
						font-size: 28rpx;
						color: #FE7000;
						margin-left: 5rpx;
					}
				}

				.BoxTop {
					margin-left: 20rpx;
					display: flex;
					align-items: center;

					text {
						display: block;
						font-size: 24rpx;
					}

					.title {
						font-family: PingFangSC, PingFang SC;
						font-weight: 600;
						font-size: 32rpx;
						color: #333333;
						font-style: normal;
					}

					.Newtitle {
						font-family: PingFangSC, PingFang SC;
						font-weight: 500;
						font-size: 24rpx;
						color: #666666;
					}
				}
			}

			button {
				width: 154rpx;
				height: 60rpx;
				background: linear-gradient(270deg, #3078FF 0%, #009DFE 100%);
				border-radius: 46rpx;
				margin: 0px;
				display: flex;
				justify-content: center;
				align-items: center;
				color: #fff;
				font-size: 26rpx;
			}
		}

		.tips {
			width: auto;
			background: #FFFFFF;
			border-radius: 16rpx;
			display: flex;
			padding: 30rpx;
			margin-top: 20rpx;

			.title {
				font-family: PingFangSC, PingFang SC;
				font-weight: 500;
				font-size: 24rpx;
				color: #000000;
			}

			.viewFlex {
				width: auto;
				margin-left: 10rpx;

				view {
					display: flex;
					align-items: center;

					text {
						font-family: PingFangSC, PingFang SC;
						font-weight: 500;
						font-size: 24rpx;
						color: #666666;
					}
				}
			}
		}

		.working_hours {
			display: flex;
			align-items: center;

			.view {
				display: flex;
				align-items: center;
				margin-right: 50rpx;
				margin-top: 40rpx;

				/deep/ .u-image {
					margin-right: 10rpx;
				}
			}
		}

		.scrollBody {
			margin-top: 10rpx;

			text {
				font-family: PingFangSC, PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #333333;
			}
		}

		.headers {
			width: auto;
			border-radius: 20rpx;
			padding: 20rpx 20rpx 30rpx 20rpx;
			background-color: #fff;
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-top: 30rpx;
			box-shadow: 0rpx 6rpx 24rpx 0rpx rgba(218, 218, 218, 0.5);

			.view {
				width: 100%;
				white-space: nowrap;

				.week {
					font-family: PingFangSC, PingFang SC;
					font-weight: 600;
					font-size: 24rpx;
					color: #333333;
				}

				.sun {
					font-family: PingFangSC, PingFang SC;
					font-weight: 600;
					font-size: 32rpx;
					color: #333333;
					margin-top: 10rpx;
				}

				view {
					width: 50rpx;
					display: inline-block;
					white-space: nowrap;
					display: flex;
					flex-wrap: wrap;
					justify-content: center;
					// border:1px solid red;
					padding-left: 10rpx;
					padding-right: 10rpx;

					text {
						display: inline-block;
						text-align: center;
					}
				}
			}
		}

		.NewFlex {
			justify-content: space-between;

			/deep/ .u-image {
				margin-left: 10rpx;
			}

			.time {
				font-family: PingFangSC, PingFang SC;
				font-weight: 400;
				font-size: 24rpx;
				color: #4C4C4C;
			}
		}

		.headers_title {
			width: auto;
			// margin: 0px auto;
			display: flex;
			align-items: center;
			margin-top: 60rpx;

			.view {
				width: 10rpx;
				height: 34rpx;
				border-radius: 6rpx;
				background-color: #2184FF;
			}

			.flex {
				display: flex;
				align-items: center;
			}

			text {
				font-family: PingFangSC, PingFang SC;
				font-weight: 600;
				font-size: 36rpx;
				color: #333333;
				margin-left: 10rpx;
				letter-spacing: 2rpx;
			}
		}
	}
</style>